<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<script type="text/javascript" src="${ctx}/scripts/jquery-1.4.2.min.js"></script> 
<script type="text/javascript" src="${ctx}/scripts/jquery.pagination.js"></script> 
<title>北京车辆段</title>
<link href="${ctx}/css/index.css" rel="stylesheet" type="text/css" /> 
<link href="${ctx}/scripts/pagination.css" rel="stylesheet" type="text/css" /> 

<script type="text/javascript"><!--

	var iTimeoutIdB=""; 
	var indexB=0; //默认第一个显示的图片的索引
	var showTimeB=4000; //显示时间（单位：毫秒）
	var img_VanishTimeB=500; //逐渐显示的时间（单位：毫秒） 
	
	var iTimeoutId=""; 
	var index=0; //默认第一个显示的图片的索引
	var showTime=4000; //显示时间（单位：毫秒）
	var img_VanishTime=500; //逐渐显示的时间（单位：毫秒）
			  
	var t = n = count = 0;
	
	function printNews(){	       
		 var url ="${ctx}/news/printnews.jsp?fileTypes=NEWS&newsid="+document.getElementById("newsid").value;
		 window.open(url, "win");
	}
			       
	 function downloadNews(){
	  	 location.href="${ctx}/files/Files/download.do?fileTypes=NEWS&fileName="+document.getElementById("newsid").value;
	  }
	  
     function search(){
		 document.form1.method = "post";
		 document.form1.action = "${ctx}/web/Web/listNews.do";
		 document.form1.submit();

	 }
	 $(document).ready(function() { 
	      initData(); //初始菜单 标题 天气预报、安全天数等信息 	
	     	
	 }); 	 
	function initData(){
     $.get('${ctx}/news/Menu/topList.do?t='+Math.random(), function(josn) {
         	 if(josn!=""){
		     josn = josn.replace(new RegExp("null","gm"),'""');
		     var mydata = eval("("+josn+")");
			     if(mydata.weather!=''){
			       var ojb=mydata.weather; 
			       var temp=ojb.names.replace(new RegExp("#","gm"),'<br>'); 
			       
			       document.getElementById("weather").innerHTML='<img src="${ctx}'+ojb.urls+'" height="50px"/>'+'<div>'+temp+'</div>';
			        
			   }
			    
			    if(mydata.menus!=''){
			      var ojb=mydata.menus;
			      var content='';
			      for(var i=0;i<ojb.length;i++){
			        if(ojb[i].urls==''){
			           ojb[i].urls='#';
			        } 
			        content+='<li>';
			        content+='<a href="'+ojb[i].urls+'">'+ojb[i].names+'</a>';
			        content+='<ul>';
			        content+='<li><a href="'+ojb[i].urls+'">'+ojb[i].names+'</a></li>';
                    if(ojb[i].childrenMenu!=''){
                        var children=ojb[i].childrenMenu;
 						for(var j=0;j<children.length;j++){ 
							content+='<li><a href="'+children[j].urls+'">'+children[j].names+'</a></li>';
						 }
						
			         }
			         content+='</ul>';
			         content+='</li>';
			         
			      }
			     // alert(content);
			      document.getElementById("nav").innerHTML=content;
			      menuFix();
			   }
			    if(mydata.topTitle!=''){
			      var ojb=mydata.topTitle;
			      var content='<dl>';
			      for(var i=0;i<ojb.length;i++){
			        if(i>0&&i%2==0){
			            content+='</dl><dl>';
			        }
					if('${sessionScope.username}'!= '') {    		
 				        content+='<dd><a href="'+ojb[i].urls+'">'+ojb[i].names+'</a> </dd>';					
				    }else{		 
				        if(ojb[i].names == '支出动态表' || ojb[i].names == '通讯录' || ojb[i].names == '值班表'){
				             content+='<dd><a href="javascript:alert(\'您没有登录或者您的账号没有访问权限！\');">'+ojb[i].names+'</a></dd>';
				       			
				        }else{       
					 		 content+='<dd><a href="'+ojb[i].urls+'">'+ojb[i].names+'</a> </dd>';	
					    }					
				    }
				  }
			      content+=' <div class="clear"></div>'; 
			      document.getElementById("logo_middle").innerHTML=content;
			      
			     
			   } 
			   
			}
			  
        }) ;  
     } 
	function menuFix() { 
	 var sfEls = document.getElementById("nav").getElementsByTagName("li");
	 	for (var i=0; i<sfEls.length; i++) {
		  sfEls[i].onmouseover=function() {
		  var ul = this.getElementsByTagName("ul")[0];
			  if(ul){
			      ul.style.display = "block";
				  this.className+=(this.className.length>0? " ": "") + "sfhover";
			  }
		  }
		  sfEls[i].onmouseout=function() {
		  		var ul = this.getElementsByTagName("ul")[0];
			  if(ul){
			      ul.style.display = "none";
			  	   this.className+=(this.className.length>0? " ": "") + "sfhover";
			  }
		  }
		 }
     }	
	 function download(id){
		location.href="/files/Files/download.do?fileTypes=SOFT&fileName="+id;
	 } 
--></script>
</head>
<body>
<div class="box">
 <div class="top">
    	<div class="Tright"><a onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://10.78.109.32/index.jsp')"						          href="#">设为首页</a> |     
	    <a href="#" onclick="javascript:window.external.AddFavorite('http://10.78.109.32/index.jsp','北京车辆段')" title="收藏本站到你的收藏夹">收藏本站</a></div>
        您好，欢迎光临北京车辆段！
    </div> 
	 <div class="top_img">   	
		<div class="column">
         <div class="photo" id="photo">
          <ul class="clear" id="photo-sub" style="width:2944px;height:200px">
           <li><a href="#" title="图片说明一" target="_blank"><img src="${ctx}/images/web/qj3.jpg" /></a></li>
            <li><a href="#" title="图片说明一" target="_blank"><img src="${ctx}/images/web/qj1.jpg" /></a></li>
           <li><a href="#" title="图片说明一" target="_blank"><img src="${ctx}/images/web/qj.jpg" /></a></li>
           <li><a href="#" title="图片说明一" target="_blank"><img src="${ctx}/images/web/qj1.jpg" /></a></li>
          </ul>
         </div>
        </div>	
    </div>  
    <script type="text/javascript" src="${ctx}/scripts/lunbo.js"></script>
    <div class="logo_box">
    	<div class="logo"><a href="#"><img src="${ctx}/images/web/logo.jpg" /></a></div>
        <div id="logo_middle" class="logo_middle">
         
            
            <div class="clear"></div>
        </div>
        <div class="logo_tq">
        	 
            <div id="weather">
             
            </div>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </div>
    <div class="nav_box">
    	<ul id="nav">
          
		</ul>
    </div>
    <div class="login_box">
         
    	<div class="login">
        <form id="forms" action="${ctx}/web/Web/webLogin.do" method="post">
         <input type="hidden" id="newsid" name="newsid" value="<%=request.getParameter("newsid")%>" /> 
           
          <c:if test="${sessionScope.username==null||sessionScope.username==''}" >
            用户名：<input name="userName" type="text" class="shurubox" />
            密码：<input name="userPwd" type="password" class="shurubox" />
          <input type="button" onclick="login()" value="立即登录" class="liji" />
          </c:if>
            <c:if test="${sessionScope.username!=null&&sessionScope.username!=''}" >
                您好!&nbsp;${sessionScope.username}  
                 &nbsp;<a  href="${ctx}/web/Web/webLogout.do" style="color:#6c6c6c;cursor:pointer;"> [退出] </a>
				 <a href="javascript:openpwd();" style="color:#6c6c6c;cursor: pointer;"  >[修改密码] </a>
           </c:if>
          <c:if test="${requestScope.result!=null&&requestScope.result!=''}" >
			 <script type="text/javascript" >
			     alert('${requestScope.result}'); 
			 </script>
		 </c:if> 
          </form>
      
        </div>
        <div class="login_search">
       <form name = "form1">
        	  <input type="text" name="newskeyword" value="请输入搜索关键字" class="search_box"  onfocus="if(value =='请输入搜索关键字'){value =''}" onblur="if (value ==''){value='请输入搜索关键字'}"/> <input type="button" class="search_but" value="" onclick = "javascript:search();"/>
      </form>
        </div>
        <div class="clear"></div>
    </div>
    <c:if test="${sessionScope.username==null||sessionScope.username==''}" >
     <script type="text/javascript">
       alert('您没有登录或者您的账号没有访问权限！');
     </script>
    </c:if>
      <c:if test="${sessionScope.username!=null&&sessionScope.username!=''}" >
    <div class="content">
    
    	<div id="nr_top" class="nr_top">视频专栏</div>
        <div id="nr_title" class="nr_title"  >
        	<h2 id="newtitile">${requestScope.title}</h2>
            <p id ="newscreatetime">${requestScope.createTime} </p>
        </div>
         <div  class="nr_title"  style="height:540px">
        <object id="player" height="540" width="500" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
				    <param NAME="AutoStart" VALUE="-1">
				    <!--是否自动播放-->
				    <param NAME="Balance" VALUE="0">
				    <!--调整左右声道平衡,同上面旧播放器代码-->
				    <param name="enabled" value="1">
				    <!--播放器是否可人为控制-->
				    <param NAME="EnableContextMenu" VALUE="-1">
				    <!--是否启用上下文菜单-->
				    <param NAME="url" value="${ctx}${requestScope.url}">
				    <!--播放的文件地址-->
				    <param NAME="PlayCount" VALUE="1">
				    <!--播放次数控制,为整数-->
				    <param name="rate" value="1">
				    <!--播放速率控制,1为正常,允许小数,1.0-2.0-->
				    <param name="currentPosition" value="0">
				    <!--控件设置:当前位置-->
				    <param name="currentMarker" value="0">
				    <!--控件设置:当前标记-->
				    <param name="defaultFrame" value="">
				    <!--显示默认框架-->
				    <param name="invokeURLs" value="0">
				    <!--脚本命令设置:是否调用URL-->
				    <param name="baseURL" value="">
				    <!--脚本命令设置:被调用的URL-->
				    <param name="stretchToFit" value="0">
				    <!--是否按比例伸展-->
				    <param name="volume" value="50">
				    <!--默认声音大小0%-100%,50则为50%-->
				    <param name="mute" value="0">
				    <!--是否静音-->
				    <param name="uiMode" value="Full">
				    <!--播放器显示模式:Full显示全部;mini最简化;None不显示播放控制,只显示视频窗口;invisible全部不显示-->
				    <param name="windowlessVideo" value="0">
				    <!--如果是0可以允许全屏,否则只能在窗口中查看-->
				    <param name="fullScreen" value="0">
				    <!--开始播放是否自动全屏-->
				    <param name="enableErrorDialogs" value="-1">
				    <!--是否启用错误提示报告-->
				    <param name="SAMIStyle" value>
				    <!--SAMI样式-->
				    <param name="SAMILang" value>
				    <!--SAMI语言-->
				    <param name="SAMIFilename" value>
				    <!--字幕ID-->
			</object>
		</div>	
		<div class="br_bottom" id="br_bottom" >
		   <a href="javascript:download('${requestScope.id}');" class="baocun">下载本地</a>
        </div>
        <div id ="newscontent"  class="nr_wenzi">
        	<pre>
				<p>${requestScope.desc}</p>
			</pre>
        </div>
        
        <div class="clear"></div>
    </div>
     </c:if>
    <div class="footer"><ul>Copyright ©2011-2012 北京车辆段 版权所有</ul>
								信息技术科 联系电话：010-51868237
	</div>
</div>
</body>
</html>
 
